/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 26727
 * Date: 2024-01-11
 * Time: 18:21
 */
import java.util.Scanner;

interface IntArray{
    public int[] outIntArray();
}

interface StringArray{
    public String[] outStringArray();
}

class ArrayDataAdapter implements IntArray{
    private StringArray out;

    //编写构造函数；
    /******************begin**************************/
  public ArrayDataAdapter(StringArray out) {
      this.out = out;
  }
    /******************************end*************************/

    public int[] outIntArray(){
        /*****************************begin************************/
     String[] arr1 = out.outStringArray();
     int[] arr2 = new int[arr1.length];
     for(int i = 0; i < arr2.length; i++) {
         arr2[i] = arr1[i].length();
     }
     return (arr2);
        /******************************end*************************/
    }
}


class GenStringArray implements StringArray
{
    private String str1;
    public GenStringArray(String str1){
        this.str1 = str1;
    }
    public String[] outStringArray(){
        String[] sarr = str1.split(" ");
        return sarr;
    }

}


public class Main
{
    public static void main(String[] args)
    {
        Scanner sc=new Scanner(System.in);
        String str1 = sc.nextLine();
        GenStringArray gsa = new GenStringArray(str1);
        IntArray iarr = new ArrayDataAdapter(gsa);
        int[] ia = iarr.outIntArray();
        String str2="";
        for(int i=0;i<ia.length;i++)
            str2 += String.valueOf(ia[i])+" ";
        str2 = str2.trim();
        System.out.println(str2);
    }
}

